home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c++ / 1010 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.5 KB

  1. From: jgealow@mtl.mit.edu (Jeffrey C. Gealow)
  2. Message-ID: <kywx3q1nox.fsf@gator.mit.edu>
  3. X-Original-Date: 08 Apr 1996 16:10:54 -0400
  4. Path: in2.uu.net!bounce-back
  5. Date: 09 Apr 96 04:27:35 GMT
  6. Approved: fjh@cs.mu.oz.au
  7. Newsgroups: comp.std.c++
  8. Subject: Re: static members as members of a metaclass h
  9. Organization: MIT Microsystems Technology Laboratories
  10. References: <4jc5lt$doh@arl-news-svc-2.compuserve.com>
  11.     <4jckdc$ad6@engnews1.Eng.Sun.COM>
  12. In-Reply-To: clamage@Eng.Sun.COM's message of 28 Mar 96 09:26:03 GMT
  13. X-Newsreader: Gnus v5.1
  14. X-Auth: PGPMoose V1.1 PGP comp.std.c++
  15.     iQBFAgUBMWnnP+EDnX0m9pzZAQG4GAF7Bgy3QUanZqfTOkrg5AKY9vEk510oJro8
  16.     TI5Xnjj50FBeK9eHOkQWpkzjmownUsl+
  17.     =7rPQ
  18.  
  19. In article <4jckdc$ad6@engnews1.Eng.Sun.COM> clamage@Eng.Sun.COM 
  20. (Steve Clamage) writes:
  21.  
  22.    I believe a reasonable solution to the problem of initialization of 
  23.    non-local static data is not to use non-local static data!
  24.  
  25.    Instead of a static data object or static class data member, use a 
  26.    function with a local static object.
  27.  
  28. But this adds the overhead of the function call mechanism to every use 
  29. of the object.
  30.  
  31. Jeff
  32. ---
  33. [ comp.std.c++ is moderated.  To submit articles: try just posting with      ]
  34. [ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu         ]
  35. [ FAQ:      http://reality.sgi.com/employees/austern_mti/std-c++/faq.html    ]
  36. [ Policy:   http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
  37. [ Comments? mailto:std-c++-request@ncar.ucar.edu                             ]
  38.